import React from 'react';

const svgMap = {
  plus: require('assets/plus.svg'),
  check: require('assets/check.svg'),
  delete: require('assets/delete.svg'),
  clock: require('assets/clock.svg'),
};

export default ({ type, className = '', size = 'md', ...restProps }) => {
  type = svgMap[type];
  return <svg
      className={`am-icon am-icon-${size} ${className}`}
      {...restProps}
    >
      <use xlinkHref={`#${type.default.id}`} />
    </svg>
}
